Skip to content

Add randomized full-environment CTMRG projector - #464

Closed
Yue-Zhengyuan wants to merge 1 commit into
QuantumKitHub:mainfrom
Yue-Zhengyuan:codex/pr-263-randomized-projector
Closed

Yue-Zhengyuan wants to merge 1 commit into
QuantumKitHub:mainfrom
Yue-Zhengyuan:codex/pr-263-randomized-projector

Conversation

@Yue-Zhengyuan

Copy link
Copy Markdown
Member

Update #263 to the current projector layout and SVD/truncation interfaces, preserving the original randomization defaults and lazy four-quadrant contractions.

I'm opening this mainly for easier tracking of the changes relative to main branch. I'll also do a careful comparison with SI-CTMRG in #422 with help of 🤖 as suggested by @leburgel.

Port QuantumKitHub#263 to the current projector layout and
SVD/truncation interfaces, preserving the original randomization defaults
and lazy four-quadrant contractions.

Validation: 20 serial smoke-test assertions covering exact/randomized block
paths and trivial/U(1) CTMRG integration.
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 1.31579% with 75 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/algorithms/ctmrg/projectors/randomized.jl 0.00% 46 Missing ⚠️
src/algorithms/ctmrg/simultaneous.jl 0.00% 11 Missing ⚠️
src/environments/ctmrg_environments.jl 0.00% 10 Missing ⚠️
src/algorithms/contractions/ctmrg/projector.jl 0.00% 8 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 100.00% <ø> (ø)
src/algorithms/ctmrg/projectors/projectors.jl 87.50% <100.00%> (ø)
src/algorithms/contractions/ctmrg/projector.jl 88.40% <0.00%> (-11.60%) ⬇️
src/environments/ctmrg_environments.jl 70.29% <0.00%> (-3.67%) ⬇️
src/algorithms/ctmrg/simultaneous.jl 85.33% <0.00%> (-14.67%) ⬇️
src/algorithms/ctmrg/projectors/randomized.jl 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# parse SVD forward & rrule algorithm

decomposition_algorithm = if alg in [:HalfInfiniteProjector, :FullInfiniteProjector]
decomposition_algorithm = if alg in [:HalfInfiniteProjector, :FullInfiniteProjector, :randomized]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should randomized have capital R for consistency

@@ -0,0 +1,95 @@
"""Full-environment randomized SVD projector from PR 263."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "from PR 263" should be removed here

@kshyatt

kshyatt commented Oct 20, 2026

Copy link
Copy Markdown
Member

We do have randomized SVD support on CUDA wrapped in MatrixAlgebraKit, btw. That shouldn't block this at all but might be good to leave a TODO comment to integrate with it later, if we can?

@Yue-Zhengyuan

Yue-Zhengyuan commented Oct 20, 2026 •

Copy link
Copy Markdown
Member Author

I've realized that the "randomized SVD" from #263 is much more similar to the subspace iteration approach. For CTMRG, it seems that the goal is not to reach the dominant singular subspace each time we calculate the projectors (which I think is what a general randomized SVD will do), but to eventually reach it over several full CTMRG iterations, so we can recycle the rangefinders from previous CTMRG steps.

Nevertheless, significant changes are upcoming to both #464 and #422, and I tend to eventually merge them (with some choices to make) and just call the new projector algorithm SubspaceIterationProjector.

@kshyatt

kshyatt commented Oct 20, 2026

Copy link
Copy Markdown
Member

Thanks for the clarification!

@Yue-Zhengyuan

Copy link
Copy Markdown
Member Author

Close in favor of #422.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants